Completed
Push — master ( faec18...f285ef )
by Travis
02:29
created

app.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
nc 1
nop 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A app.js ➔ ... ➔ ??? 0 4 1
1
2
/**
3
 * First we will load all of this project's JavaScript dependencies which
4
 * includes Vue and other libraries. It is a great starting point when
5
 * building robust, powerful web applications using Vue and Laravel.
6
 */
7
8
require('./bootstrap');
9
10
/**
11
 * Next, we will create a fresh Vue application instance and attach it to
12
 * the page. Then, you may begin adding components to this application
13
 * or customize the JavaScript scaffolding to fit your unique needs.
14
 */
15
16
Vue.component('example', require('./components/Example.vue'));
0 ignored issues
show
Bug introduced by
The variable Vue seems to be never declared. If this is a global, consider adding a /** global: Vue */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
17
18
const app = new Vue({
0 ignored issues
show
Unused Code introduced by
The constant app seems to be never used. Consider removing it.
Loading history...
19
    el: '#app'
20
});
21
22
import autosize from 'autosize';
23
24
autosize($('textarea'));
25
26
$('.vote-form').submit(e => {
27
	e.preventDefault();
28
29
    axios.post(`/votes/${e.target.snippet_id.value}`)
0 ignored issues
show
Bug introduced by
The variable axios seems to be never declared. If this is a global, consider adding a /** global: axios */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
30
        .then(response => {
31
            $(e.target.vote_btn).toggleClass('liked');
32
            $(e.target.vote_btn).siblings('.like-counter').html(response.data.count);
33
        });
34
});
35